﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
using System.Data;
using DotNetDal.Core;
using DotNetDal.Core.Data;
using DotNetDalTest.Entities;

namespace DotNetDalTest
{
    class Program
    {
        static void Main(string[] args)
        {
            DotNetDal.Core.SqlServer.NeedConnectionStringEvent += new SqlServer.NeedConnectionStringHandler(SqlServer_NeedConnectionStringEvent);

            Query q =
                new Query(new Address())
                    .AddWhere("PersonId", Query.Comparison.Equals, 172523)
                    .AddLeftBracket(Query.Operator.And, "LastName", Query.Comparison.Equals, "Eppel")
                        .AddAnd("FirstName", Query.Comparison.Equals, "Gregory")
                    .AddRightBracket()
                    .AddAnd("BirthDate", Query.Comparison.Equals, new DateTime(1982, 9, 16));

            DALRecord[] addresses = q.FetchResults();

            Console.ReadLine();
        }

        static string SqlServer_NeedConnectionStringEvent(object o, EventArgs e)
        {
            return "";
        }
    }
}
